import axios from 'axios'
const instance = axios.create()

instance.interceptors.request.use(config => {
    config.timeout = 10000
    return config
})
instance.interceptors.response.use(res => res.data,err => {
    return Promise.reject(err)
})

export const get = (url,config={}) => instance.get(url,config)

export const post = (url,data = {},config = {}) => instance.post(url,data,config)